-
Notifications
You must be signed in to change notification settings - Fork 0
feat(gymnasts): add the gymnast page #163
Merged
Merged
+4,182
−262
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added with the shadcn CLI (npx shadcn@latest add tabs) and formatted with Prettier. It is built on the Base UI tabs, so it follows the WAI-ARIA tabs pattern.
The dialog of DeleteGymnastButton becomes its own component, so that removing an element from the list can use the same "are you sure?" dialog.
One query asks for the gymnast with all routines and elements. gymnastDetail.ts groups them by apparatus and marks the highest routine, so changing apparatus costs no request.
Route /gymnasts/:gymnastId behind the login check, with a tab for each apparatus, the routines of the chosen apparatus, the list of elements with a remove button for each element, and loading, error, empty and not-found states. Refs: #149
The name is a link inside the heading, and its ::after covers the whole card. The delete button stays above it. Refs: #149
Add New routine and Add from search buttons, a shared TrashButton, ListSection and StretchedLink, LinkButton (a real link with the pill look) and Button icon. Errors are in three layers: ErrorMessage, ErrorPanel and ErrorPage. Fix the layout on phones, the dark hover color and the Highest label. Refs: #149
The element page follows the theme with readable contrast. Add to gymnast is a menu for a logged-in coach and a link with a lock otherwise. Try in a routine uses Button with an icon, and DifficultyBadge is used for vaults. Refs: #149
The query, the mutation and add() leave the menu component, so it only shows the choices. The behaviour and the tests are unchanged. Refs: #149
… pages Add docs/STATE_MANAGEMENT.md, a section on the two pages in ACCESSIBILITY.md, a link in the README, and remove the deleted ElementValueBadge from its table. Refs: #149
xeniag
approved these changes
Nov 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build runs, passed all test including axe-core accessibility tests. Looked fine when I ran it locally too, the functionality for adding elements to a gymnast works well. Light and dark mode is ok also.
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The Gymnast page: the page for one gymnast, reached from a card on "Your gymnasts". It shows one apparatus at a time, with the routines and their D-scores, and the list of elements of the gymnast on that apparatus.
What is in it
/gymnasts/:gymnastIdbehind the login check. A visitor who is not logged in is sent to the login page. An unknown or foreign id shows a clear "not found".role="status"message tells what happened.DeleteGymnastButtonis now a sharedConfirmDialog, used by both the delete button and the removal of an element.Choices
PageTitle,Button,DifficultyBadge).global.cssmake the value under the difficulty badge readable on the dark card. The badge itself is not changed.Testing
npm run lint,tsc -bandnpm run buildare clean.npm run test:run: 52 files, 633 tests pass. New tests cover the grouping logic, the page on the real Apollo Client with a stub forfetch, the confirmation dialog, the link from the cards, and the redirect to the login page.docs/AI_USAGE.md). A screen reader was not used.Open points
Part of #149
🤖 Generated with Claude Code